<html>
<head><meta charset="utf-8"><title>is possible to have `goto bb0`? · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/is.20possible.20to.20have.20.60goto.20bb0.60.3F.html">is possible to have `goto bb0`?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225291499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/is%20possible%20to%20have%20%60goto%20bb0%60%3F/near/225291499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/is.20possible.20to.20have.20.60goto.20bb0.60.3F.html#225291499">(Feb 05 2021 at 12:20)</a>:</h4>
<p>Hi, I was wondering if it is possible that the MIR of a function can be structured in such a way that some basic block has a terminator that jumps to bb0 or if it is guaranteed that bb0 is only executed once per function call.</p>



<a name="225291694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/is%20possible%20to%20have%20%60goto%20bb0%60%3F/near/225291694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/is.20possible.20to.20have.20.60goto.20bb0.60.3F.html#225291694">(Feb 05 2021 at 12:22)</a>:</h4>
<p>Yes, it's possible: <a href="https://rust.godbolt.org/z/rhr7ja">https://rust.godbolt.org/z/rhr7ja</a></p>



<a name="225291823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/is%20possible%20to%20have%20%60goto%20bb0%60%3F/near/225291823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/is.20possible.20to.20have.20.60goto.20bb0.60.3F.html#225291823">(Feb 05 2021 at 12:24)</a>:</h4>
<p>Oh great, thank you :)</p>



<a name="225291908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/is%20possible%20to%20have%20%60goto%20bb0%60%3F/near/225291908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/is.20possible.20to.20have.20.60goto.20bb0.60.3F.html#225291908">(Feb 05 2021 at 12:25)</a>:</h4>
<p>why does this change if i return <code>c</code> at the end of that function?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>